package org.com.yz.dal.dao.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 在途账户2---资金明细表
 * </p>
 *
 * @author wzc123
 * @since 2018-07-31
 */
@Getter
@Setter
@TableName("his_accnt_onway2")
public class HisAccntOnway2 extends Model<HisAccntOnway2> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id_his_accnt_onway2", type = IdType.AUTO)
    private Integer idHisAccntOnway2;
    /**
     * 商户号
     */
    @TableField("mch_no")
    private String  mchNo;

    @TableField("transaction_no")
    private String transactionNo;
    /**
     * 事件名称
     */
    private String event;
    /**
     * 时间发生金额
     */
    @TableField("event_amt")
    private Long eventAmt;

    @TableField("event_time")
    private Date eventTime;
    /**
     * 商户在途账户2资金余额---事件发生前
     */
    @TableField("accnt_amt_before")
    private Long accntAmtBefore;
    /**
     * 商户在途账户2资金余额---事件发生后
     */
    @TableField("accnt_amt_after")
    private Long accntAmtAfter;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    @TableField("update_time")
    private Date updateTime;
    /**
     * 在途帐类型（count：总额，detailed :明细）
     */
    private String type;
    /**
     * 余额
     */
    private Long balance;

    private String orderNo;


    private String flag;//是否从准备金借款标记 0：未借， 1：已借



    @Override
    protected Serializable pkVal() {
        return this.idHisAccntOnway2;
    }

    @Override
    public String toString() {
        return "HisAccntOnway2{" +
        "idHisAccntOnway2=" + idHisAccntOnway2 +
        ", mchNo=" + mchNo +
        ", transactionNo=" + transactionNo +
        ", event=" + event +
        ", eventAmt=" + eventAmt +
        ", eventTime=" + eventTime +
        ", accntAmtBefore=" + accntAmtBefore +
        ", accntAmtAfter=" + accntAmtAfter +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", type=" + type +
        ", balance=" + balance +
        "}";
    }
}
